---
title: "Customize Form - Links Table"
space: "Frappe Framework"
url: "https://support.aakvatech.com/Frappe Framework/customize-form-links-table"
updated: "2026-07-22"
---

<p>The <strong><code>links</code></strong> table in the <strong>Customize Form</strong> Doctype is used to define relationships between the current Doctype and other Doctypes. Each row in the <strong><code>links</code></strong> table represents a link or relationship. Here is an explanation of the individual fields in the <strong><code>links</code></strong> table and their usage:</p>
<hr>
<h3 id="-1-link_doctype-"><strong>1. <code>link_doctype</code></strong></h3>
<ul>
<li><strong>Description:</strong> Specifies the target Doctype to which the link is created.</li>
<li><strong>Use:</strong> Define the Doctype that the current Doctype should reference or interact with. For example, linking a Sales Order to a Customer Doctype.</li>
</ul>
<hr>
<h3 id="-2-link_fieldname-"><strong>2. <code>link_fieldname</code></strong></h3>
<ul>
<li><strong>Description:</strong> The fieldname in the current Doctype used for the link.</li>
<li><strong>Use:</strong> Identifies the field in the current Doctype that establishes the link to the specified Doctype. For example, a <code>customer</code> field in a Sales Order links to the Customer Doctype.</li>
</ul>
<hr>
<h3 id="-3-group-"><strong>3. <code>group</code></strong></h3>
<ul>
<li><strong>Description:</strong> Categorizes the link under a specific group.</li>
<li><strong>Use:</strong> Organize links into groups for better readability or functionality, especially when dealing with complex Doctypes.</li>
</ul>
<hr>
<h3 id="-4-hidden-"><strong>4. <code>hidden</code></strong></h3>
<ul>
<li><strong>Description:</strong> Indicates whether the link should be hidden from the user interface.</li>
<li><strong>Use:</strong> Hide links that are not directly relevant to the user but are used in backend processes or automation.</li>
</ul>
<hr>
<h3 id="-5-idx-"><strong>5. <code>idx</code></strong></h3>
<ul>
<li><strong>Description:</strong> Specifies the sequence number of the link in the list.</li>
<li><strong>Use:</strong> Controls the order in which links are displayed in the <code>links</code> table.</li>
</ul>
<hr>
<h3 id="-examples-of-usage-"><strong>Examples of Usage:</strong></h3>
<ol>
<li><p><strong>Linking a Sales Invoice to a Customer:</strong></p>
<ul>
<li><code>link_doctype</code>: Customer</li>
<li><code>link_fieldname</code>: customer</li>
<li><strong>Use:</strong> Establish a relationship where a Sales Invoice references the Customer Doctype.</li>
</ul>
</li>
<li><p><strong>Linking a Task to a Project:</strong></p>
<ul>
<li><code>link_doctype</code>: Project</li>
<li><code>link_fieldname</code>: project</li>
<li><strong>Use:</strong> Ensure every Task is associated with a specific Project.</li>
</ul>
</li>
<li><p><strong>Hidden Link for Backend Use:</strong></p>
<ul>
<li><code>link_doctype</code>: User</li>
<li><code>link_fieldname</code>: owner</li>
<li><code>hidden</code>: Checked</li>
<li><strong>Use:</strong> Track the user who created the document without displaying it to others.</li>
</ul>
</li>
<li><p><strong>Grouped Links for Better Organization:</strong></p>
<ul>
<li><code>link_doctype</code>: Item</li>
<li><code>link_fieldname</code>: item_code</li>
<li><code>group</code>: Inventory</li>
<li><strong>Use:</strong> Group item-related links together in the interface.</li>
</ul>
</li>
</ol>
<hr>
<p>These fields allow you to define and manage the relationships between Doctypes, enabling smooth data integration and automation across modules.</p>
